perm filename ARM.LOU[UP,DOC]2 blob sn#065753 filedate 1973-10-01 generic text, type T, neo UTF8
GENERAL
The arm has six degrees of freedom corresponding  to  6  joints.  The
joints  are  numbered from 1 to 6 starting at the shoulder and moving
out to the hand. All rotary joint angles  are  measured  in  degrees.
Joint 3 which is linear is measured in inches.

The  coordinate  system is referenced to the table top with the table
lying in the x y plane at z=0 with the z axis pointing vertically up.
The  origin  is at the corner of the table. The base of the arm is at
20,10 approximately.

The Arm is normally controlled by  specifying  what  happens  to  the
hand. The program checks that the hand will not intersect the table.

On  the  finger  tips  are  two touch sensors which can interrupt arm
operation.

The  program  which runs the arm is in the form of an interpreter and
works in two basic modes: Planning and  Execution.  In  the  planning
mode  arm  functions are assembled into a data file which may then be
executed by a "DO" command. Functions may be immediately executed  by
prefixing the function call by "DO". For example.

	OPEN 3
	PARK
	DO

will  cause  a  data  file to be constructed, either on the 3330 as a
file WAVE.TRJ or on the Swapping disk, containing the  two  functions
open  the  hand to 3 inches and then move to the park position. These
two commands are then executed by the DO.

	DO OPEN 3
	DO PARK

This will have the same effect except that the planning program  will
be   activated  between  each  function  call,  which  is  very  time
consumming.

It is possible to write symbolic  programs  either  in  the  form  of
macros  using  the "DEFINE" pseudo op, or by creating a text file and
reading it in by a "REQUIRE" pseudo op.

What follows is a list of the Functions, Errors and how  to  run  the
arm.



DO <function> | DO <program> | DO
If DO is followed by a function then that function will be  executed.
This  does  not  change  the  state  of  any  program being compiled.
Otherwise the <id> following the DO is taken as the program name.  If
DO  is  terminated  by a C/R then the default program is executed. If
this does not exist the servo will return  an  error  status  3.  The
default  program  name  is  that  last set by FILE this is changed by
DOing another program, in which case its  program  name  becomes  the
default, or by a BEGIN pseudo op.

REQUIRE <file spec>
This causes the input scanner to read from the designated file.  When
an  EOF  is encountered scan returns to the TTY. <file spec>::= <file
name>.<ext>[pppn] where if <ext> is null then  HAL  is  used  and  if
[pppn] is missing the running pppn is assumed.

DUMP <file spec>
This causes a file to be  opened  and  all  transforms,  vectors  and
macros  are  written  out  in  symbolic  form.  It is the opposite to
REQUIRE.  If  a  file  already  exists,  of  the  same  name,  it  is
over-written!!!

TRANS <id>
<X> <Y> <Z> <O> <A> <T>
This pseudo op is  on  two  lines  and  is  used  to  set  up  a  4x4
transformation  and  to identify it with an <id>. The <X> <Y> and <Z>
specify the position of a point centrally located between the  finger
tips in table coordinates. <O> <A> and <T> specify the orientation of
the hand. with all three angles (in degrees) zero the hand points  in
the  negative  "y"  direction with the fingers in a horizontal plane.
the orientation vector which points from one finger tip to the  other
is  aligned  along  the  "x"  axis.  <O>  specifies a rotation of the
orientation vector about a vertical direction; thus at <O>=90 degrees
the  hand  still  horizontal  would  point  along  the  positive  "x"
direction. <A> is a  rotation  about  the  orientation  vector.  With
<A>=90  degrees  the hand always points straight down. <T> is a final
rotation about the axis of the wrist and corresponds to a rotation of
the  final  joint.  When talking to the interpreter directly from the
TTY only as many parameters that have changed  need  to  be  retyped.
Further  a  delimiter  (which  includes  a  space) indicates that the
parameter is to remain unchanged.  For  example  to  change  the  <Z>
parameter only one types
TRANS <id>
<space><space><Z>C/R.

VECT <id>
<X> <Y> <Z>
This is similar to TRANS except that it sets up vectors.

BEGIN <id>
This pseudo op starts a program of name <id>. If this  pseudo  op  is
not  given before any instruction then a default BEGIN <default name>
is automatically generated.

END
This  closes files and deletes any save and restore cell assignments,
if a program has not been ENDed before a DO <program> is executed  an
automatic END is performed but in this case the save and restore cell
assignments are not lost.

WAIT
Causes  the  arm to stop at the corresponding point during execution.
Execution may be resumed (after executing any number of functions) by
a proceed command.

P <integer>
this causes the arm to proceed from a wait or an error state, if  the
argument  is  non  zero  execution  proceeds with the last or current
instruction, otherwise from the next instruction.

FILE <id>
This  changes  the  default file name to <id>. It is initially set at
WAVE.

WHERE
This  causes  the  arm's  position  to be read and the position to be
typed out. This function is automatically executed when  the  program
is  started.  It  should  only  be executed if the arm has been moved
manually.

HERE <id>
This is like TRANS except that the hands position is read as in WHERE
to give the initial position for the transform <id>. Its main use  is
in  defining  positions  by  moving  the  hand  and  then  creating a
transform to represent the present position.


PARK
Generates  a  trajectory to the PARK position, which has joint angles
-180, -90, 14, -90, 90, 0

GO <trans> | GO <trans> <dx> <fac> <axis> <deg>
Generates  a three part trajectory to either <trans> or in the second
case to <trans> rotated about a  vector  <axis>,  <deg>  degrees  and
translated an additional vector <dx> scaled by <fac>. There are three
predeclared vectors about which the hand may be  rotated:  TWIST  the
axis  of  the  hand, TURN normal to the plane of the fingers and TILT
the axis through the fingers. In the case of the  translation  vector
there are similarly three predeclared vectors: REACH in the direction
of the fingers, SWEEP in the direction from finger tip to finger  tip
and  LIFT in the direction of the normal to the plane of the fingers.
These predeclared vectors, all  of  magnitude  1,  are  in  the  hand
coordinate system not in the table coordinate system which makes them
useful for relative motion.

MOVE <trans> | MOVE <trans> <dx> <fac> <axis> <deg>
This  is  the  same  as  GO except that a smooth trajectory is fitted
through the three positions.

DRAW <pos> <rot> <angle> <crank> <axis> <deg> <time> <loop>
This  is  a  controlled  motion of the hand. The hand is moved to its
present position plus the vector <pos>.  As  it  moves  the  hand  is
rotated about a vector <rot>, <angle> degrees. If <crank> is not null
then the hand is assumed to be attached  to  a  crank  which  is  the
initial  position  +  <crank> and as the first motion is executed the
hand attached to the end of the crank is rotated about an axis <axis>
<deg>  degrees.  If  loop  is  non  zero  and  the  initial and final
positions are the same the loop motion may be  repeated  continuously
<loop> times. The entire motion takes <time> jiffies. A jiffy is 1/60
th. second.

CHANGE <dx> <fac> <rot> <deg> <time>
This  causes a differential motion of vector <dx> scaled by <fac> and
simultaneously the hand rotated about a vector <rot>, <deg>  degrees.
The motion shall take no less than <time> jiffies.

DRIVE <joint> <dist> <time>
This causes joint <joint>(1 is the root joint -- 6 is the hand) to be
driven  <dist>  degrees,  or  in  the case of joint 3 ---inches, in a
minimum time <time>. All other joints brakes remain  on  unless  free
joints are also specified.

PLACE
This causes the hand to move down until it meets some resistance.

OPEN <dist>
This causes the hand to be opened or closed until the opening between
the  fingers is <dist>, it gives up after about 4 seconds and returns
error 22 if it is unable to comply.

CLOSE <dist>
This  always  closes the hand until it meets some resistance. It then
checks that the opening of the hand is greater than <dist>. If it  is
less  it returns error 2. This is useful in checking that the hand is
holding something.

CENTER <dist>
This  is  the  same  as CLOSE except that the hand is driven to close
centrally over the object using touch.

SCREW <vel>
This instruction will drive the tool at velocity <vel> (maximum =63).
It must be MERGEd with some arm motion.
i.e.
	SCREW 27
	MERGE
	CHANGE REACH 1 NIL 0 100
While  the  hand reaches one inch the tool will drive at velocity 27.
Normally FREE joints would  also  be  specified  together  with  some
STOPping  constraint.  Note  NIL,  of  zero  value, is the only other
predeclared vector.


FREE <n> <f1> ... <fn>
For  each  of  the  <n>  direction vectors <fn> joints of the arm are
freed  during  the  next  arm  motion.  These  joints  have   gravity
compensation,  additional forces and acceleration compensation but no
position sensitive feedback. The vectors <fn> specify  directions  in
table coordinates.

For example.

	VECT X
	1 0 0
	VECT Y
	0 1 0
	FREE 2 X Y
	CHANGE REACH 1 NIL 0 100

Would provide for free motion in the x and y direction while the hand
reaches 1 inch for the next 100 jiffies.

SPIN <n> <f1> ... <fn>
For each of the <n> axis vectors <fn> joints of the arm are freed  as
in FREE.

FORCE <fv> <mv>
During the next arm motion additional predicted joint torques will be
applied such as to exert a force <fv> and moment <mv> at the hand.

For example.

	VECT Z
	0 0 -1
	FREE 1 Z
	VECT F
	0 0 -50
	FORCE F NIL
	CHANGE NIL 0 NIL 0 100

This would provide for a direction of free motion in the z  direction
while  exerting  a  force of 50 oz. straight down. i.e. the hand will
push down at 50 oz foe the next 100 jiffies.

STOP <fv> <mv>
If during the next arm motion the force and moment at the hand exceed
<fv>  and  <mv>  the  arm  will stop. If such a condition is not meet
during the motion an error 23 will be returned.

WOBBLE <deg>
This  causes  the outer three joints to be modulated with a sine wave
of amplitude <deg> degrees.

NNUL
At  the  end  of the next motion do not wait to null out joint errors
but stop the arm immediately.





CONO <arrive> <depart> <k> <ts> <tm> <weight>
This  function  executed immediately before any motion instruction is
used to modify the performance of that motion. All motions  start  at
an  initial  position  move to a position given by initial + <depart>
where <depart> is a vector which is always restored  to  0,0,3  after
each  motion  instruction.  The arm then moves to a position given by
final + <arrive> where arrive is similar to <depart>, and then to the
final  position.  In  the  case  of  PARK <arrive> is set to null.  A
vector <k> is used to specify the radii of  gyration  of  the  object
held  in  the  hand.  the x axis is along the direction normal to the
plane of the fingers. the y direction is along the direction  of  the
orientation  vector (between the finger tips). and the z direction is
along the fingers. The weight of the object is given in  <weight>  in
ounces.  <ts>  is  the  minimum time in jiffies (1/60 second) for the
initial and final parts of the trajectory, and <tm>  is  the  minimum
time  for  the  mid  part.  non  zero times are used to slow down arm
motions.

MERGE
This  function  if  executed  before  a motion instruction causes the
instruction before the motion instruction to  be  executed  with  the
motion.  This  is  only useful with OPEN if it is desired to open the
hand as it moves off.
i.e
	OPEN 3
	MERGE
	MOVE T
will cause the hand to start opening as the arm starts to move.

TOUCH <mask>
This causes the arm to stop during the next instruction if any of the
masked touch sensors in <mask> are activated.
i.e.
	TOUCH 3
	OPEN 0
will  cause  the  hand  to  close  until  it touches something. If it
touches anything an error <mask>&6 is returned where <mask> are those
sensors which have been activated.


SAVE <id>
The current deviation in x,y and z from the set  point  is  saved  in
cell <id>. for example if the hand were move to a position T and then
CENTERed the deviation of position of the  hand  from  T,  after  the
centering operation can be saved in <id>
i.e.
	MOVE T
	CENTER 1
	SAVE C1
Note that this does not save any change in hand orientation.

SET <id> <vect>
This will preload cell  <id>  with  the  deviation  x,y,z  in  vector
<vect>.

RESTORE <id> <int>
This instruction must be executed immediately  after  a  MOVE  or  GO
instruction and will cause the hand to move to the position specified
plus the deviation. SAVEd in cell <id>. If <int> is non zero the cell
will be freed for further use.
i.e.
	MOVE T
	RESTORE C1 1
will cause the hand to move to T plus the vector SAVEd in C1. It will
also free up C1 for further use.


JUMP <label>
All instructions may be labelled by a label followed by a colon,  and
the JUMP instruction will cause control to jump to that instruction.
i.e.
L1:	MOVE T
	PARK
	JUMP L1
will cause an infinite loop.

SKIPE <error>
If error <error> occurs during execution on the previous  instruction
then the following instruction is skipped.
i.e.
L1:	OPEN 3
	CHANGE REACH 1 NIL 0 0
	CLOSE 1
	SKIPE 2
	JUMP L2
	JUMP L1
L2:
will  cause  the hand to advance by inches snapping its jaws until it
finds something wider than 1 inch.

SKIPN <error>
The same as SKIPE except that it skips only  if  the  error  did  not
occur. Which makes the last example cleaner.
L1:	OPEN 3
	CHANGE REACH 1 NIL 0 0
	CLOSE 1
	SKIPN 2
	JUMP L1

SKIPS <error>
This is like SKIPE in that the right octal digit of  the  error  must
match  exactly  but it also requires that the logical AND of the high
order digits with <error> is true. This is mostly used in touch work.
For  example if either error 46 or error 16 would indicate some state
then a SKIPS 56 would detect it.

AOJ <label>
This  is  the  same  as JUMP except that it will perform a spiral box
search as follows. A SEARCH command must have first been executed  to
calculate the differential joint angle changes to make an x deviation
and a y deviation at the place that the search must be executed. Then
every  time  the  AOJ  instruction  is  executed  it first performs a
RESTORE of appropriate magnitude to  generate  the  spiral  and  then
performs the JUMP.
i.e.
	MOVE T
	SEARCH 1
L1:	MOVE T
	AOJ L1
Will cause a spiral search in one inch steps. The first move to T  is
important as the context for the SEARCH must be established.

SEARCH <step>
Computes the change in joint angles to conduct a search, in  the  x,y
plane,  where  the  arm  is currently planned to be and zeros the AOJ
counters.

FLUSH
Due  to  the  partial paging scheme used by the arm, Jumps must occur
within pages This instruction will cause a new page  to  be  started.
This will soon go away.


LINK <n>
Will cause the transformation of link <n> ( 3 ≤ n  ≤6)  to  be  typed
out.

GRASP
Causes the current hand opening to be typed out.

WEIGHT
Causes the uncompensated weight that  the  hand  is  believed  to  be
holding, based on error torques, to be typed out.

I
Causes the joint angles to be typed out.

DEFINE <macro name> <par>
<body>
This defines a macro of name <macro name> and formal parameters given
by  <par>  a list of identifiers. The body then follows,line by line.
The macro is terminated by a blank line. macros  may  be  nested.  An
example
DEFINE GRAB MIN
MOVE T
CLOSE MIN

If the macro call appears then the expanded code will be assembled.
	GRAB 2
will assemble as
	MOVE T
	CLOSE 2
These macros are written out by the DUMP command and are read  in  by
the REQUIRE command.

ED <macro name>
This is a rudementary editor. The <macro  name>  must  be  given  the
first  time  but  need  not be gived again if the same macro is to be
re-edited. The macro definition is then presented line by line  every
time a C/R is typed. Previous lines may be retrieved by typing ALT.
	A "D" will delete the current line
	An "I" will insert a line after the present line, to be typed
	in.
	An "R" will replace the current line with one to be typed in.
	A "T" will cause the next line to be typed.
All these commands may be preceded by an unsigned integer which  will
do  n  of  them.  For  example  5D will delete the current and next 4
lines. When you have finished editing the macro  type  "E"  then  the
macro  will  be read in again and redefined. (assuming that the first
line which has the DEFINE is not deleted. This by the way is  a  good
way  to  modify  existing  macros  if the macro name is changed a new
macro will be defined. One additional feature  is  "F"  followed  SOS
manner  by  a  string.  It will then do a series of C/Rs until a line
with a matching string is found.

This